package com.qingcloud.adminbackend.entity.sysorder;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * <p>
 * 用户可管理订单表
 * </p>
 *
 * @author liyuhong
 * @since 2018-12-28
 */
@Data
public class SysUserOrderMgrDTO implements Serializable {

    private String id;

    @ApiModelProperty(value = "订单名称", example = "")
    private String orderName;

    @ApiModelProperty(value = "是否可写 0不是 1是", example = "")
    private int manage;

    @ApiModelProperty(value = "能否勾选管理 0不能 1能")
    @TableField(exist = false)
    private int enableManage = 1;

    @ApiModelProperty(value = "是否可读 0不是 1是", example = "")
    private int read;

    @ApiModelProperty(value = "业务类型（1：网格化，2:健康云）", example = "")
    private List<String> businessTypes = new ArrayList<>();

    @ApiModelProperty(value = "客户名称", example = "")
    private String orgName;

    @ApiModelProperty(value = "用户Id", example = "")
    private String userId;

    @ApiModelProperty(value = "搜索字段", example = "")
    private String searchVal;

    @ApiModelProperty(value = "设备数", example = "")
    private String equipmentNum;

    @ApiModelProperty(value = "业务类型（1：网格化，2:健康云）", example = "")
    private String businessType;

    @ApiModelProperty(value = "身份ID")
    private String roleId;

    @ApiModelProperty(value = "创建时间", example = "")
    private String createTime;

    @ApiModelProperty(value = "订单描述", example = "")
    private String describe;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SysUserOrderMgrDTO that = (SysUserOrderMgrDTO) o;
        return Objects.equals(id, that.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
